const { defineConfig } = require('@vue/cli-service')
const path = require('path');

let proxyObj = {}

module.exports = defineConfig({
  devServer:{
    // host:'localhost',
    // port:8080,
    // proxy:proxyObj

  },
  lintOnSave: false,
  configureWebpack: {
    devtool: 'source-map',
  },
  chainWebpack: (config) => {
    config.plugin('define').tap((definitions) => {
      Object.assign(definitions[0], {
        __VUE_OPTIONS_API__: 'true',
        __VUE_PROD_DEVTOOLS__: 'false',
        __VUE_PROD_HYDRATION_MISMATCH_DETAILS__: 'false'
      })
      return definitions
    }),
    config.resolve.alias.set(false, resolve('net')) // 设置 @ 为 src 目录的别名
    .end()
  },

})
function resolve(dir) {
	return path.join(__dirname, dir);
}